package com.ostrich.lib_common.base;

import android.os.Bundle;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;

import androidx.databinding.ViewDataBinding;
import androidx.lifecycle.ViewModel;

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/6 08:43
 * @Description : BaseMvvmFragment
 */
public abstract class BaseMvvmFragment<VM extends ViewModel,VDB extends ViewDataBinding>  extends BaseFragment<VDB>{
    protected VM viewModel;
    public abstract void createViewModel();

    @Override
    public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {
        createViewModel();
        return super.onCreateView(inflater, container, savedInstanceState);
    }
}
